GATE CSE 2006


Q41.

Which one the following in place sorting algorithms needs the minimum number of swaps?
GateOverflow

Q42.

To implement Dijkstra's shortest path algorithm on unweighted graphs so that it runs in linear time, then data structure to be used is
GateOverflow

Q43.

Consider the relation account (customer, balance) where customer is a primary key and there are no mall values. We would like to rank customers according to decreasing balance. The customer with the largest balance gets rank 1. Ties are not broken but ranks are skipped: if exactly two customers have the largest balance they each get rank 1 and rank 2 is not assigned. Consider these statements about Query 1 and Query 2. 1. Query 1will produce the same row set as Query 2 for some but not all databases 2. Both Query 1 Query 2 are correct implementations of the specification 3. Query 1 is a correct implementation of the specification but Query 2 is not 4. Neither query 1 nor Query 2 is a correct implementation of the specification 5. Assigning rank with a pure relational Query takes less time than scanning in decreasing balance order the assigning ranks using ODBC Which two of the above statements are correct?
GateOverflow

Q44.

Consider the relation enrolled (student, course) in which student, course) is the primary key, and the relation paid (student, amount) where student is the primary key . Assume no null values and no foreign keys or integrity constraints. Given the following four queries: Query 1: Select from enrolled where student in (select student form paid) Query 2: Select student from paid where student in (select student from enrolled) Query 3: Select E. student from enrolled E, paid P where E. student= P student Query 4: Select student from paid where exists (select*from enrolled where enrolled student=paid.student) Which one of the following statements is correct?
GateOverflow

Q45.

Consider the following log sequence of two transactions on a bank account, with initial balance 12000,that transfer 2000 to a mortgage payment and, then apply a 5% interest. 1. T1 start 2. T1 B old = 12000 new = 10000 3. T1 M old = 0 ne = 2000 4. T1 commit 5. T2 start 6. T2 B old = 10000 new = 10500 7. T2 commit Suppose the database system crashed just before log record 7 is written. When the system is restarted, which one statement is true of the recovery procedure?
GateOverflow

Q46.

Consider the circuit in the diagram. The \oplus operator represents Ex-OR. The D flip-flops are initialized to zeroes (cleared). The following data : 100110000 is supplied to the "data" terminal in nine clock cycles. After that the values of q_{2}q_{1}q_{0} are
GateOverflow

Q47.

You are given a free running clock with a duty cycle of 50% and a digital waveform f which changes only at the negative edge of the clock. Which one of the following circuits (using clocked D flip flops) will delay the phase of f by 180^{\circ} ?
GateOverflow